<?php
/**
 * slide模型
 * @author 
 * @version 1.0
 * @package application
 * @subpackage application/models
 */

class Slide_Model extends MY_Model
{
 
	public function __construct(){
		parent::__construct();
		$this->_pk='id';
		$this->_attributes=array( 
				'id'=>'',
				'img_url'=>'',
				'img_title'=>'',
				'img_descript'=>'',
				'url'=>'',
				'sort'=>'',
				'created'=>'',
				'modified'=>'',
				'status'=>'',
		);
	}


	/**
	 * 通过sort_id获取数据
	 * @param  [int] $attributes [sort_id]
	 * @return [mixed]            [如果成功则返回结果集,否则返回false]
	 */
	public function get_value_by_sortid($sort_id)
	{
		$query=$this->db->select()->from($this->table_name());
	
		return $query->get()->row_array();
	}
}